<template>
  <span class="title" v-show="name" v-bind:style="{ color: color }">{{
    name
  }}</span>
</template>

<script>
export default {
  props: {
    name: {
      default: "标题",
      type: String
    },
    color: {
      default: "#26e2fb",
      type: String
    }
  },
  data() {
    return {};
  }
};
</script>

<style scoped lang="scss">
.title {
  color: #26e2fb;
  font-size: 22px;
  font-weight: bold;
  position: relative;
  line-height: 1;
  &::after {
    position: absolute;
    content: "";
    display: block;
    width: 72px;
    margin-left: 50%;
    left: -36px;
    margin-top: 5px;
    height: 2px;
    background: #235ab9;
  }
}
</style>
